Welcome![Sign In][Sign Up]
Location:
Search - delphi 232

Search list

[Delphi/CppBuilderDelphi_程序设计基础教程

Description: 目 录 第 1 章 Delphi 集成开发环境 ..................... 1 2.2.4 指针类型................................... 30 2.2.5 过程与函数类型....................... 31 1.1 Delphi 主窗口 ........................................ 2 1.1.1 标题栏 ........................................ 2 1.1.2 菜单栏 ........................................ 2 1.1.3 工具栏 ........................................ 3 1.1.4 组件板 ........................................ 3 1.2 Delphi 窗体窗口..................................... 3 1.2.1 窗体窗口 .................................... 3 1.2.2 窗体文件 .................................... 4 1.3 代码编辑窗口 ........................................ 4 1.4 对象查看器窗口 .................................... 4 1.4.1 对象查看器窗口的组成............. 5 1.4.2 设置属性 .................................... 5 1.4.3 添加事件 .................................... 6 1.5 项目管理器 ............................................ 6 1.5.1 项目组成 .................................... 7 1.5.2 项目管理器 ................................ 9 1.5.3 项目管理 .................................. 10 1.5.4 项目编译和运行....................... 12 1.6 Delphi 程序设计过程........................... 14 1.7 实验 ...................................................... 17 习题 ............................................................... 19 2.2.6 可变类型................................... 31 2.3 常量和变量的定义............................... 32 2.3.1 常量........................................... 32 2.3.2 变量........................................... 32 2.4 运算符和表达式................................... 33 2.4.1 算术运算符............................... 34 2.4.2 逻辑运算符............................... 34 2.4.3 关系运算符............................... 34 2.4.4 位运算符................................... 35 2.4.5 指针运算符............................... 35 2.4.6 集合运算符............................... 35 2.5 语句 ...................................................... 36 2.5.1 简单语句................................... 36 2.5.2 条件语句................................... 36 2.5.3 循环语句................................... 38 2.6 过程与函数........................................... 40 2.6.1 过程和函数的声明................... 40 2.6.2 过程和函数的参数................... 40 2.6.3 过程和函数的调用................... 42 2.7 实验 ...................................................... 43 2.7.1 编写对象 Pascal 应用程序....... 43 第 2 章 Delphi 的编程语言........................ 21 2.7.2 函数和过程的编写和调用 ....... 44 2.1 保留字和标识符 .................................. 21 习题 ............................................................... 46 2.1.1 保留字和标准指令符............... 21 第 3 章 Delphi 窗体与组件........................ 47 2.1.2 标识符 ...................................... 22 2.1.3 注释 .......................................... 22 2.1.4 控制台程序中的屏幕输入 3.1 Delphi 窗体........................................... 47 3.1.1 窗体与窗口............................... 47 和输出 ...................................... 22 3.1.2 窗体属性................................... 47 3.1.3 窗体事件................................... 48 2.2 Object Pascal 的数据类型.................... 23 2.2.1 简单数据类型........................... 24 2.2.2 字符串类型 .............................. 28 2.2.3 结构类型 .................................. 29 3.2 设计窗体 .............................................. 48 3.2.1 新建窗体................................... 48 3.2.2 设置窗体属性........................... 49 3.2.3 添加组件 .................................. 49 3.2.4 编辑组件 .................................. 49 3.2.5 设置组件属性........................... 49 3.2.6 保存文件 .................................. 49 3.3 文本型组件 .......................................... 50 3.3.1 Label 组件 ................................ 50 3.3.2 Static Text 组件 ........................ 51 3.3.3 Tab 组件 ................................... 52 3.4 按钮型组件 .......................................... 52 3.4.1 Button 组件............................... 52 3.4.2 BitBtn 组件............................... 53 3.4.3 RadioButton 组件 ..................... 54 3.4.4 CheckBox 组件......................... 54 3.5 编辑型组件 .......................................... 54 3.5.1 Edit 组件................................... 54 3.5.2 MaskEdit 组件.......................... 56 3.5.3 Memo 组件 ............................... 57 3.5.4 RichEdit 组件 ........................... 58 3.6 列表框型组件 ...................................... 60 3.6.1 ListBox 组件............................. 60 3.6.2 CheckBox 组件......................... 62 3.6.3 ComboBox 组件 ....................... 62 3.7 滑块型组件 .......................................... 63 3.7.1 Scrollbar 组件........................... 63 3.7.2 TrackBar 组件 .......................... 64 3.8 容器型组件 .......................................... 64 3.8.1 GroupBox 组件......................... 64 3.8.2 Panel 组件................................. 65 3.8.3 ScrollBox 组件 ......................... 66 3.9 MDI 程序 ............................................. 66 3.9.1 MDI 窗体及其属性.................. 66 3.9.2 利用模板创建 MDI 应用 程序 .......................................... 67 3.10 实验 .................................................... 68 3.10.1 设计由按钮类组件实现 的功能窗体............................. 68 3.10.2 设计由列表类组件实现的 功能窗体 ................................ 70 3.10.3 按需求将各种组件灵活组合, 实现功能窗体......................... 73 习题 ............................................................... 74 第 4 章 菜单设计............................................ 76 4.1 菜单设计简介....................................... 76 4.1.1 菜单结构................................... 76 4.1.2 菜单命令项的作用................... 76 4.1.3 菜单设计器............................... 77 4.2 主菜单设计........................................... 77 4.2.1 打开主菜单设计器................... 78 4.2.2 添加菜单命令项....................... 78 4.2.3 菜单命令项分组....................... 79 4.2.4 菜单命令项热键....................... 79 4.2.5 调整菜单命令项....................... 79 4.2.6 创建级联菜单........................... 80 4.3 菜单命令响应....................................... 80 4.4 运行时设置菜单................................... 82 4.4.1 菜单命令灰显........................... 83 4.4.2 隐藏菜单命令........................... 83 4.4.3 改变菜单命令文本................... 84 4.4.4 菜单命令单选标记................... 84 4.4.5 菜单命令复选标记................... 84 4.5 创建动态菜单....................................... 85 4.6 图形菜单 .............................................. 88 4.7 快捷菜单设计....................................... 89 4.7.1 快捷菜单的设计....................... 89 4.7.2 快捷菜单的响应....................... 90 4.8 实验 ...................................................... 91 习题 ............................................................... 93 第 5 章 对话框、工具栏和状态栏设计 .... 95 5.1 对话框设计........................................... 95 5.1.1 文件对话框组件....................... 95 5.1.2 字体对话框组件....................... 97 5.1.3 颜色对话框组件....................... 98 5.1.4 打印、打印设置和页面设置 对话框组件............................... 98 5.1.5 查找和替换对话框组件........... 99 5.1.6 消息框和输入框..................... 100 5.1.7 对话框综合应用实例..............102 7.3.1 异常响应与 try…except 5.2 工具栏设计 .........................................107 语句......................................... 155 5.2.1 用面板构成工具栏..................107 7.3.2 异常保护与 try…finally 5.2.2 使用工具栏组件......................112 语句......................................... 157 5.2.3 使用 TCoolBar 组件................113 7.3.3 异常的重引发和处理嵌套 ..... 159 5.2.4 使用 TControlBar 组件 ...........115 7.3.4 定义自己的异常..................... 159 5.3 状态栏设计 .........................................115 7.3.5 利用异常响应编程................. 163 5.4 实验 .....................................................118 7.4 Delphi 调试器..................................... 165 习题 ..............................................................121 7.4.1 准备调试................................. 165 第 6 章 Delphi 多媒体应用.......................123 7.4.2 设置调试器的选项................. 165 7.5 控制程序的运行................................. 166 6.1 绘图组件 .............................................123 7.5.1 单步执行................................. 166 6.1.1 TShape 组件 ............................123 7.5.2 跟踪执行................................. 167 6.1.2 画布对象 .................................124 7.5.3 跳过一段代码......................... 168 6.1.3 TPaintBox 组件 .......................124 7.5.4 全速执行剩余的代码............. 168 6.1.4 TImage 组件 ............................124 7.5.5 返回到执行点......................... 168 6.2 图形列表组件 .....................................130 7.5.6 暂停运行................................. 168 6.2.1 TTreeView 组件 ......................130 7.5.7 重新开始运行......................... 168 6.2.2 TListView 组件 .......................131 7.5.8 命令行参数............................. 169 6.3 图形栅格组件 .....................................132 7.6 断点 .................................................... 169 6.3.1 TStringGrid 组件 .....................133 7.6.1 源代码断点............................. 169 6.3.2 TDrawGrid 组件......................134 7.6.2 机器指令断点......................... 170 6.3.3 TColorGrid 组件......................136 7.6.3 数据断点................................. 171 6.4 图形日历组件 .....................................136 7.6.4 模块断点................................. 171 6.4.1 TDateTimePicker 组件 ............137 7.6.5 指定遇到断点时的行为......... 171 6.4.2 TCalendar 组件........................137 7.6.6 断点列表窗口......................... 172 6.5 多媒体组件 .........................................137 7.6.7 删除断点................................. 173 6.5.1 TMediaPlayer 组件..................137 7.6.8 设置断点的属性..................... 173 6.5.2 多媒体播放器..........................138 7.6.9 禁止和允许断点..................... 173 6.5.3 Flash 播放器............................141 7.7 监视表达式的值................................. 174 6.6 实验 .....................................................144 7.7.1 观察窗口................................. 174 习题 ..............................................................148 7.7.2 计算和修改表达式的值......... 175 第 7 章 Delphi 异常处理与调试..............150 7.1 Delphi 异常处理..................................150 7.1.1 异常处理的意义......................150 7.1.2 错误类型 .................................151 7.2 Delphi 异常类 .....................................153 7.3 Delphi 异常处理机制..........................155 7.7.3 计算提示................................. 176 7.7.4 Inspector 窗口......................... 176 7.7.5 查看局部变量的值................. 177 7.8 实验 .................................................... 177 7.8.1 Delphi 异常处理机制 ............. 177 7.8.2 Delphi 调试............................. 178 习题 ............................................................. 180 第 8 章 数据库编程......................................183 8.1 数据库系统概述 .................................183 8.1.1 数据库管理系统......................183 8.1.2 关系数据库 .............................184 8.1.3 数据库应用程序......................184 8.1.4 Delphi 数据库的体系结构......184 8.2 BDE 组件 ............................................188 8.2.1 TTable 组件介绍 .....................189 8.2.2 TQuery 组件介绍 ....................199 8.3 ADO 组件............................................206 8.3.1 TADOConnection 组件 ...........208 8.3.2 TADOCommand 组件.............210 8.3.3 TADODataSet 组件.................212 8.3.4 TADOTable 组件 ....................213 8.4 数据控制组件简介 .............................214 8.4.1 TDBGrid 组件介绍 .................215 8.4.2 TDBNavigator 组件介绍.........217 8.4.3 TDBText 组件介绍 .................219 8.4.4 TDBEdit 组件介绍..................219 9.1.1 QuickReport 概述 .................. 244 9.1.2 TQuickRep 组件 .................... 245 9.1.3 TQRSubDetail 组件................ 247 9.1.4 TQRBand 组件 ....................... 248 9.1.5 TQRChildBand 组件............... 249 9.1.6 TQRGroup 组件...................... 250 9.1.7 TQRLabel 组件....................... 250 9.1.8 TQRDBText 组件................... 250 9.1.9 TQRExpr 组件........................ 250 9.1.10 TQRsysData 组件 ................. 251 9.1.11 TQRMemo 组件 ................... 252 9.1.12 TQRRichText 组件............... 252 9.1.13 TQRDBRichText 组件.......... 252 9.1.14 TQRShape 组件 .................... 252 9.1.15 TQRImage 组件.................... 252 9.1.16 TQRDBImage 组件 .............. 252 9.1.17 TQRComposite 组件............. 252 9.1.18 TQRPreview 组件................. 253 9.2 QuickReport 报表实例 ....................... 253 8.4.5 TDBMemo 组件介绍 ..............220 9.2.1 打印单数据库报表................. 253 8.4.6 TDBImage 组件介绍...............221 9.2.2 打印标签、信封..................... 256 8.4.7 TDBListBox 组件介绍............221 9.2.3 打印主/明细表........................ 258 8.4.8 TDBComboBox 组件介绍 ......221 9.2.4 打印分组与统计报表............. 260 8.4.9 TDBCheckBox 组件介绍........222 9.3 Rave 报表设计器的组件.................... 262 8.4.10 TDBRadioGroup 组件介绍 ...222 9.3.1 Rave 5 的报表设计界面......... 262 8.4.11 TDBLookupListBox 组件 介绍 .......................................223 8.4.12 TDBLookupComboBox 组件 介绍 .......................................223 9.3.2 Drawing(绘图)组件页 ............ 263 9.3.3 Bar Code(条形码)组件页 ....... 263 9.3.4 Standard(标准)组件页 ............ 263 9.3.5 Report(报表)组件页 ............... 263 8.4.13 TDBCtrlGrid 组件介绍 .........223 9.3.6 其他组件页............................. 264 8.4.14 TDBRichEdit 组件介绍.........224 8.4.15 TDBChart 组件介绍..............224 8.5 实验 .....................................................231 8.5.1 设计数据表结构......................231 8.5.2 设计数据表编辑窗体..............232 8.5.3 设计数据表查询窗体..............238 习题 ..............................................................242 9.4 Delphi 中的 Rave 组件....................... 265 9.4.1 RvProject 组件........................ 265 9.4.2 RvSystem 组件 ....................... 266 9.4.3 其他组件................................. 267 9.5 Rave 报表例程 ................................... 267 9.5.1 设计 Rave 报表....................... 267 9.5.2 调用 Rave 报表....................... 271 第 9 章 报表与图表......................................244 9.6 图表 .................................................... 271 9.1 QuickReport 组件................................244 9.6.1 DBChart 组件 ......................... 271 9.6.2 设计图表 .................................273 11.1.2 现有的组件........................... 309 9.7 实验 .....................................................274 11.1.3 组件模板............................... 310 习题 ..............................................................279 11.1.4 选择祖先类的建议............... 311 第 10 章 面向对象程序设计......................281 11.2 建立组件框架................................... 312 11.3 加入属性........................................... 314 10.1 面向对象程序设计概念....................281 11.3.1 加入简单型的属性............... 314 10.1.1 结构化程序设计方法............281 11.3.2 加入枚举型的属性............... 314 10.1.2 面向对象的设计方法............282 11.3.3 加入集合型的属性............... 315 10.2 类 .......................................................284 11.3.4 加入对象型的属性............... 315 10.2.1 类的定义 ...............................284 11.3.5 加入数组型的属性............... 316 10.2.2 保护方式 ...............................285 11.3.6 公开继承的属性................... 316 10.2.3 类的实例化............................286 11.3.7 给出属性的默认值............... 317 10.2.4 类操作符 ...............................286 11.4 加入方法........................................... 317 10.3 方法 ...................................................287 11.4.1 方法的可见性....................... 317 10.3.1 一般方法 ...............................287 11.4.2 避免内部相关性................... 318 10.3.2 构造方法 ...............................289 11.4.3 给方法命名........................... 318 10.3.3 析构方法 ...............................290 11.4.4 加入静态方法....................... 318 10.3.4 类方法 ...................................290 11.4.5 加入虚拟方法....................... 319 10.3.5 隐含参数 Self ........................291 11.4.6 加入动态方法....................... 319 10.4 继承和多态 .......................................292 11.4.7 加入消息处理方法............... 320 10.4.1 继承 .......................................292 11.5 加入事件........................................... 320 10.4.2 覆盖 .......................................293 11.6 安装组件........................................... 323 10.4.3 抽象类 ...................................294 11.7 实验 .................................................. 324 10.4.4 多态 .......................................295 习题 ............................................................. 327 10.4.5 共同祖先 TObject..................296 10.5 属性 ...................................................297 第 12 章 动态链接库(DLLs)编程............ 329 10.5.1 属性定义 ...............................297 12.1 动态链接库概述............................... 329 10.5.2 属性的访问方法....................298 12.1.1 Windows 系统的动态 10.6 消息 ...................................................299 链接库................................... 329 10.6.1 消息机制 ...............................299 12.1.2 为什么使用 DLL .................. 330 10.6.2 发送消息 ...............................300 12.1.3 DLL 与 EXE 文件之间 10.6.3 处理消息 ...............................301 的区别................................... 331 10.6.4 用户自定义消息....................303 12.1.4 DLL 编写规则 ...................... 331 10.7 实验 ...................................................305 12.2 在 Delphi 中编写 DLLs.................... 331 习题 ..............................................................307 12.2.1 编写一般 DLLs 的步骤........ 332 第 11 章 Delphi 自定义组件的开发.......308 12.2.2 动态链接库中的标准指示 ... 334 12.2.3 库初始化代码的编写........... 335 11.1 选择祖先类 .......................................308 12.2.4 从 DLL 中输出字符串 ......... 337 11.1.1 公共祖先类............................308 12.3 在 Delphi 中 DLLs 的调用............... 340 12.3.1 调用 DLL 方式......................340 12.3.2 静态调用 ...............................340 12.3.3 动态调用 ...............................342 12.4 利用 DLLs 实现窗体重用 ................345 12.4.1 利用 DLLs 实现窗体重用 的一般步骤............................346 12.4.2 使用 DLL 模态窗体..............346 12.4.3 DLL 中的非模态窗体...........346 12.5 DLL 与 Delphi 组件包......................351 12.6 实验 ...................................................352 习题 ..............................................................356 第 13章 多线程.............................................358 13.1 多线程概述 .......................................358 13.1.1 什么是多线程........................358 13.1.2 使用多线程的优缺点............358 13.1.3 编写多线程应用程序步骤....359 13.2 多线程编程 .......................................359 13.2.1 创建线程对象........................359 13.2.2 线程的同步............................361 13.2.3 设置线程的优先级................362 13.2.4 挂起和唤醒............................363 13.2.5 缓存线程对象........................363 13.2.6 线程终止 ...............................365 13.2.7 一个多线程排序程序............370 13.3 实验 ...................................................375 习题 ............................................................. 379 第 14 章 文件操作 ....................................... 381 14.1 文件操作命令................................... 381 14.1.1 文件的类型........................... 381 14.1.2 文件的定义........................... 381 14.1.3 文件管理命令....................... 382 14.1.4 文本文件命令....................... 382 14.1.5 输入输出命令....................... 383 14.2 文本文件........................................... 383 14.2.1 打开文本文件....................... 383 14.2.2 关闭文本文件....................... 384 14.2.3 写入文本文件....................... 384 14.2.4 读取文本文件....................... 385 14.3 非文本文件....................................... 386 14.3.1 类型文件............................... 386 14.3.2 无类型文件........................... 389 14.4 文件系统........................................... 390 14.4.1 文件系统组件....................... 390 14.4.2 文件控制单元....................... 393 14.5 实验 .................................................. 396 14.5.1 文件名操作........................... 396 14.5.2 文件读写操作....................... 399 习题 ............................................................. 401 参考文献................................................... 403
Platform: | Size: 3534536 | Author: chaoyan_ma@126.com | Hits:

[Com PortDelphi与RS232串口通信

Description: 指导你如何通过串口发送数据和ASC码,并讲述如何接收-guide you through the serial port and send data ASC yards, and on how to receive
Platform: | Size: 702464 | Author: 王欣 | Hits:

[Driver Developd2xxappl

Description: Delphi直接控制usb-232接口的例子-Delphi direct control usb-232 interface example
Platform: | Size: 265216 | Author: aa | Hits:

[Driver DevelopDelphi_CBUS_bitbang

Description: Delphi直接控制usb-232的io脚-Delphi direct control usb-232 feet of io
Platform: | Size: 257024 | Author: aa | Hits:

[Windows DevelopSEND_232

Description: send data to 232 send file to 232
Platform: | Size: 204800 | Author: lzy | Hits:

[Com Portaaaa

Description: 可读写串口 232 简单明了 使用初学者学习用 我自己写的,能力有限 难免出错 请批评指正 压缩包里有说明-Serial port 232 can read and write simple to use for beginners to learn to write with my own, and the limited capacity of fallible Please compression bag criticism has made it clear that
Platform: | Size: 193536 | Author: honyry | Hits:

[CommunicationTestMXComponent

Description: 利用三菱MXComponent程序进行与fx2n,Q系列等PLC的通讯测试程序。有读取plc自带通讯口,或者232口,或者485通讯三种方式,方便工控人员学习用-Mitsubishi MXComponent use of procedures and fx2n, Q series PLC communications test procedure. Have read Communications plc own mouth, or 232, or 485 in three ways to facilitate learning by IPC
Platform: | Size: 231424 | Author: mickey | Hits:

[Delphi VCLcommint

Description: delphi的串口232通讯控件,可替代MSCOMM。简单易用-232 serial communications delphi controls, alternative MSCOMM. Easy-to-use
Platform: | Size: 20480 | Author: mickey | Hits:

[Delphi VCLRS232

Description: delphi编程,对串口232进行控制源码-delphi programming, serial port 232 to control source
Platform: | Size: 168960 | Author: delphi | Hits:

[Windows Developcan232_v1

Description: CAN 232 Windows Source
Platform: | Size: 243712 | Author: 于海 | Hits:

[Delphi VCLspcomm-RS232

Description: delphi 串行口通讯控件,带源码,开发串口程序,必须到工具。-delphi serial port communications control, with source code, the development of serial procedures, the instrument must be.
Platform: | Size: 27648 | Author: kk | Hits:

[Com PortCOMMX

Description: 日语版232串口的通信用控件源代码,主要应用于232通信程序开发和设计-Japanese version of 232 serial communication with the control source code, 232 is mainly used in the development and design of communication procedures
Platform: | Size: 9216 | Author: 刘光祥 | Hits:

[GUI DevelopCommunicationstest

Description: 用DELPHI编写的232通信程序,能实现两台电脑通过232电缆通信-DELPHI prepared with 232 communication program, to achieve two computers through the communication cable 232
Platform: | Size: 181248 | Author: 柏兆来 | Hits:

[Delphi VCLRS232_Tester

Description: rs 232 tester program
Platform: | Size: 214016 | Author: kebota | Hits:

[Communication232-terminal

Description: 232 Terminal in Delphi. Open serial port com, send data, receive data etc.
Platform: | Size: 259072 | Author: xarxas | Hits:

[Com PortVSPD-Delphi7

Description: 可虛擬兩個RS-232或者是多個RS-232互傳資訊,此源码維Delphi所編寫。-Can be a virtual two RS-232 or RS-232 over pass each other information, this source code written by Victoria Delphi.
Platform: | Size: 718848 | Author: 謝宏昇 | Hits:

[Delphi VCL232toCOMM_reader

Description: delphi 232串口通讯,本程序主要用于发卡器WG26读卡器的程序-delphi 232 serial communication, this program is mainly used for card reader devices WG26 procedure
Platform: | Size: 186368 | Author: john | Hits:

[Delphi VCLzylgpsr356

Description: ZylGPSReceiver is a Delphi / C++Builder component collection that communicates with a serial GPS receiver. It works with any NMEA compatible receiver connected to one of the serial ports. You can use it also with USB and Bluetooth devices, because these devices have a driver that redirects the input from the USB or Bluetooth port to a virtual serial port (you can check it in System/Device Manager/Ports). If your device is not provided with such a driver, then use a USB controller whose vendor provides a virtual serial port driver, such as FTDI or use a USB/RS-232 adapter. With this component you will be able to develop robust GPS Delphi or C++Builder applications.
Platform: | Size: 1231872 | Author: b0x | Hits:

[Com PortMSCommEx

Description: PLC串口调试程序,串行通信编程的方法,对采用了RS-232接口的仪器进行串行通信的计算机测控软件开发,以及实现仪器功能和指标的验收-Microsoft Comm Control 6.0中)-vb serial communications debugging method existing electronic weighing a Taiwan, the use of serial communication with the computer. Preparation of VB to visit serial, electronic scales to read displayed on the data. The electronic scales for BE01-type instrument, the output of RS-232C standard interface
Platform: | Size: 212992 | Author: wanglonglong | Hits:

[Delphi VCLTestCom

Description: 测试串口通信,COM1口等,串行通信,232 -Testing serial communication, COM1 port, etc., serial communications, 232
Platform: | Size: 222208 | Author: 王虎 | Hits:
« 12 »

CodeBus www.codebus.net